package com.ruoyan.mapper;

import com.ruoyan.pojo.Department;
import com.ruoyan.pojo.Employee;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Package: com.ruoyan.Mapper
 * @ClassName: DepartmentMapper
 * @Author: ruoyan1998
 * @CreateTime: 2021/5/19 16:17
 * @Description:
 */
@Mapper
public interface DepartmentMapper
{
    /**
     * 查询所有部门
     *
     * @return List<Department>*/
    List<Department> queryDepartment();


    Department queryDepartmentById(int id);

    /**
     * 根据id查询部门
     *
     * @param id
     * @return Department*/
    Department queryDepartmentByIdFindDid(int id);

    /**
     * 添加部门
     *
     * @param department
     * @return int*/
    int addDepartment(Department department);

    /**
     * 更新部门信息
     *
     * @param department
     * @return int*/
    int updateDepartment(Department department);

    int updateChargeManToNull(Map<String,Object> map);

    /**
     * 删除部门
     *
     * @param id
     * @return int*/
    int deleteDepartment(int id);
}
